<?php

// Display errors in production mode
ini_set('display_errors', 1);

// let's get started
require_once('application/tyvoMvc.php');
$tyvo = tyvoMvc::singleton();

if (!isset($_GET['page'])) {
	$page="undefined";
} else {
	$page=$_GET['page'];
}
session_start();

switch($page) {
	case 'home' :
		$tyvo->getController()->home($_GET['state']);
	break;
	case 'contents' :
		$tyvo->getController()->contents($_GET['state'], $_GET['p']);
	break;
	case 'content' :
		$tyvo->getController()->content($_GET['id'], $_GET['p']);
	break;
	case 'profil' :
		$tyvo->getController()->profile($_GET['p']);
	break;
	case 'action' :
	default :
		$_SESSION['user']=null;
		$tyvo->getController()->home(1);
	break;
}

?>
